﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Soveryn.Commerce.API;
using Soveryn.Commerce.BaseClasses;
using Soveryn.Commerce.Shared;

namespace Soveryn.Commerce.Pages
{
    public partial class EmarketingTrack : PageBaseClass
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["EID"] != null)
            {

                Dictionary<string, object> EmployeeExternalSessionValidArgs = new Dictionary<string, object>();
                EmployeeExternalSessionValidArgs.Add("WebsiteAPIKey", PageBaseClass.WebsiteAPIKey);
                EmployeeExternalSessionValidArgs.Add("EmarketingSendQueueID", Request.QueryString["EID"]);
                EmployeeExternalSessionValidArgs.Add("DidClickThrough", false);
                EmployeeExternalSessionValidArgs.Add("WasEmailOpened", true);
                APIEnvelope env = Soveryn.Commerce.Shared.API.Call(PageBaseClass.EmployeeAPIURL, "EmarketingSendQueueAddUpdate", EmployeeExternalSessionValidArgs, false, false);

            }
        }
    }
}